Chris Pollett > CS185C
( Print View )

Student Corner:
  [Grades Sec1]
 
  [Submit Sec1]
 
  [
Lecture Notes]

Course Info:
  [Texts & Links]
  [Topics]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]

Practice Exams:
  [Mid1]  [Mid2]  [Final]

                           












HW#1 --- last modified March 02 2019 17:07:45..

Solution set.

Due date: Feb 11

Files to be submitted:
  helloMain.c
  hello.prc

Purpose: To make sure people can get some Palm development environment correctly set up on their machines at home, as well to gain experience with memory management on the Palm.

Specification:

For this assignment your job is to modify the helloMain.c program from Hello World 2 example in the book (p. 109). The source code for all examples in the book is available on the book's website. The helloMain.c that you submit should output the person's name where each letter has been output three times in a row. For instance, clicking Say Goodbye after typing the name Fred would should pop up an alert with: ``Fare thee well, FFFrrreeeddd.'' your program will have to allocate more memory through the memory manager to store this longer string. The hello.prc file should contain a working compiled program. (Just to make sure you can actually compile something.)

Point Breakdown

Departmental coding guidelines for C followed. Only need to do this for part of code you modify. 1pt
hello.prc seems to be obtained from compiling your hello.c and the other files from the Hello World 2 example in the book. 2pts
Use MemHandleNew (orMemHandleResize), MemHandleLock, MemHandleUnlock, MemSet, and MemMove constructively10pts
Program does what it supposed to without memory leaks. 2pts
Total15pts